package com.gimi.cloud.jimi.dao.dao.userInfo;

import com.gimi.cloud.jimi.dao.dao.sys.BaseDao;
import com.gimi.cloud.jimi.dao.myMapper.MyMapper;
import com.gimi.cloud.jimi.dto.userInfo.RdTaobaoDTO;
import com.gimi.cloud.jimi.entity.userInfo.RdTaobao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface RdTaobaoDao extends MyMapper<RdTaobao>, BaseDao<RdTaobao, RdTaobaoDTO> {

    @Select("SELECT * FROM rd_taobao WHERE user_id = '#{userId}' AND (is_delete IS NULL OR is_delete = '0') ORDER BY tb_id DESC LIMIT 1")
    public RdTaobao getNewestTaobaoByUser(Integer userId);
}
